package ch08;

class ExceptionEx03 {
	public static void main(String args[]) {
		int number = 100;
		int result = 0;

		for(int i=0; i < 10; i++) {
			try {
				result = number / (int)(Math.random() * 10);
				System.out.println(result);
			} catch (ArithmeticException e)	{
				System.out.println("0");
			}
		}
	} 
}
/*
100
0
16
12
20
12
0
14
25
14
*/